import React, { useState, useEffect } from 'react'
import './Css/Home.css'
import { Layout } from 'antd';

import Header from './Component/Title'
import Sidebar from './Component/Sidebar'
import Unfold from './Component/Unfold';




const layoutStyle = {
  width: '100%',
  height: '100vh',
};



export default function Home() {

  const [collapsed, setCollapsed] = useState(false);
  const Updata_collapsed = (items: any) => {
    setCollapsed(items);
  }



  return (
    <Layout style={layoutStyle}>
      <Header updatacollapsed={Updata_collapsed} name={localStorage.getItem('user')}></Header>
      <Layout>
        <Sidebar collapsed={collapsed}></Sidebar>
        <Unfold collapsed={collapsed}></Unfold>
      </Layout>
    </Layout>
  )
}
